package jpa4azure.type;

import java.lang.reflect.Field;
import java.util.Collection;
import java.util.logging.Logger;

import jpa4azure.impl.Persistable;

public abstract class TypeWrapper {
	public static Logger logger = Logger.getLogger("com.thewebsemantic");
	
	public boolean assignableTo(Class<?> c) {
		return c.isAssignableFrom(getWrappedType());
	}
	public abstract boolean isHasKey();
	public abstract Object newInstance();	
	public abstract FieldContext[] getFields(Object o);
	public abstract FieldContext[] getDirtyFields(Persistable o);
	public abstract Key id(Object o);

	public abstract void setId(Object bean, String partition, String row);
	public abstract Class<?> getWrappedType();
	public abstract String name();
	public abstract String getTableName();
	public abstract Field getField(String name);
	public abstract Collection<Field> getFields();
	public abstract Collection<Field> getAggregateFields();

}